<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>背景线性渐变</title>
    <style>
        div {
            width: 600px;
            height: 200px;
            /* background: linear-gradient(left,red,blue); */
            /* 背景渐变必须添加浏览器私有前缀， */
            /* background: -webkit-linear-gradient(left,red,blue); */
            background: -webkit-linear-gradient(red,blue);
            
        }
    </style>
</head>
<body>
    <p>语法1</p>
    <ul>
        <li>
            background:linear-gradient(起始方向，颜色1，颜色2······)
        </li>
        <li>
            background:-webkit-linear-gradient(left,red,blue)
        </li>
        <li>
            background:-webkit-linear-gradient(left，top,red,blue)
        </li>
    </ul>

    <div></div>
    <p>背景渐变必须添加浏览器私有前缀
        <br>
        起始方向可以是：方位名词或者度数，如果省略默认就是top
    </p>
</body>
</html>